package lucava.metamodel.java;

import java.util.ArrayList;
import java.util.List;
import lucava.metamodel.java.visitor.IJavaMetaModelVisitor;

public class MetaModel {

	protected String mName;

	protected final List<MetaClassifier> mClassifiers = new ArrayList<MetaClassifier>();

	protected boolean mIsVisitable = false;

	protected MetaInterface mVisitor;

	public MetaModel() {
		this("NewMetaModel");
	}

	public MetaModel(String aMetaModelName) {
		this.mName = aMetaModelName;
	}

	public void add(MetaClassifier aClassifier) {
		this.mClassifiers.add(aClassifier);
	}

	public void remove(MetaClassifier aClassifier) {
		this.mClassifiers.remove(aClassifier);
	}

	public List<MetaClassifier> getClassifier() {
		return this.mClassifiers;
	}

	public void accept(IJavaMetaModelVisitor aVisitor) {
		aVisitor.visitMetaModel(this);
	}

	public boolean isVisitable() {
		return this.mIsVisitable;
	}

	public void setVisitableBy(MetaInterface aVisitorInterace) {
		this.mIsVisitable = true;
		this.mVisitor = aVisitorInterace;
	}

	public MetaInterface getVisitor() {
		return mVisitor;
	}

	public String getName() {
		return mName;
	}

	public void setName(String mName) {
		this.mName = mName;
	}

}
